package com.ch.demo1;

import java.util.Scanner;

public class demo1 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String str = sc.nextLine();
        int a = sc.nextInt();
        int b = sc.nextInt();
        String str1 = str.substring(a,b+1);
        StringBuffer buffer = new StringBuffer(str);
        StringBuffer stringBuffer = new StringBuffer(str1);
        String reverse = stringBuffer.reverse().toString();
        StringBuffer replace = buffer.replace(a, b + 1, reverse);
        System.out.println(replace);

    }
}
